package com.linkhub.oms.dao.mpservice.impl;

import com.linkhub.oms.entity.EntryOrderLineEntity;
import com.linkhub.oms.dao.mapper.EntryOrderLineEntityMapper;
import com.linkhub.oms.dao.mpservice.IEntryOrderLineService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 提货商品信息表 服务实现类
 * </p>
 *
 * @author echo
 * @since 2024-04-30
 */
@Service
public class EntryOrderLineServiceImpl extends ServiceImpl<EntryOrderLineEntityMapper, EntryOrderLineEntity> implements IEntryOrderLineService {

    @Override
    public void deleteByEntryOrderCode(String entryOrderCode) {
        lambdaUpdate()
                .eq(EntryOrderLineEntity::getSysEntryOrderCode, entryOrderCode)
                .remove();
    }

    @Override
    public List<EntryOrderLineEntity> listEntryOrderLines(String entryOrderCode) {
        return lambdaQuery()
                .eq(EntryOrderLineEntity::getSysEntryOrderCode, entryOrderCode)
                .list();
    }
}
